<#include "/includes/vars.inc"> 
<@pp.dropOutputFile />
<@pp.changeOutputFile name="${resourcesDir}/META-INF/persistence.xml" />
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
  <persistence-unit name="persistenceUnit" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <#list entities.entity as entity>
    <#assign entityName = entity.@name>
    <class>${project.@rootPackage}.domain.${entityName}</class>
    </#list>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties>
            <property name="hibernate.dialect" value="${r"${"}hibernate.dialect}"/>
            <property name="hibernate.search.autoregister_listeners" value="true"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
            <property name="hibernate.show_sql" value="true"/>
            <property name="hibernate.generate_ddl" value="true"/>
    </properties>
  </persistence-unit>
</persistence>

